﻿using Entities;
using Logger4Net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Hubberly
{
   public class CityWrapper
   {
      //////////////////////////////////////////////////////////////////////////
      //
      public CityWrapper(City city, ListView view)
      {
         try
         {
            city_ = city;
            item_ = view.Items.Add(city_.name);
            item_.Tag = city;
            item_.Group = view.Groups[0];
         }
         catch (System.Exception ex)
         {
            logger_.exception(ex);
         }
      }

      //////////////////////////////////////////////////////////////////////////
      //
      public City city
      {
         get { return city_; }
      }

      //////////////////////////////////////////////////////////////////////////
      //
      public ListViewItem item
      {
         get { return item_; }
      }
   
      //////////////////////////////////////////////////////////////////////////
      //
      private static Logger logger_ = new Logger(typeof(CityWrapper));
      private City city_;
      private ListViewItem item_;
   }
}
